Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADD: Payload category to support Actions #289

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

marcosrdz
Copy link
Member

No description provided.

Copy link
Member

@Overtorment Overtorment left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first, what youre trying to achieve - you can just check tht payload has .txid field on the client.
second, youre hardcoding thevalue, and instead i think youshould have modified definitions of specific notfications in openapi.yaml, to add a constant field:

        constantField:
          type: "string"
          const: "constantValue"
          description: "This is a constant field with a single value"

and then re-generate ts files from that openapi spec.

but option 1 is easier

@marcosrdz
Copy link
Member Author

first, what youre trying to achieve - you can just check tht payload has .txid field on the client. second, youre hardcoding thevalue, and instead i think youshould have modified definitions of specific notfications in openapi.yaml, to add a constant field:

        constantField:
          type: "string"
          const: "constantValue"
          description: "This is a constant field with a single value"

and then re-generate ts files from that openapi spec.

but option 1 is easier

Option 1 is not possible. Client expects it from server.

@marcosrdz marcosrdz requested a review from Overtorment October 27, 2024 16:08
@marcosrdz
Copy link
Member Author

@Overtorment lmk if I need to change anythin

@Overtorment
Copy link
Member

Why option 1 is not ok? Payload from the server for those pish types will always have a txid field

@marcosrdz
Copy link
Member Author

Why option 1 is not ok? Payload from the server for those pish types will always have a txid field

AppDelegate.mm requires the payload it receives from the server to contain the "category" property. if it doesnt exist or if its empty it will not display the buttons.

@Overtorment
Copy link
Member

is that a requirement by apple? or its up to us to change? cause frankly, modifying client is easier than server in this case

@marcosrdz
Copy link
Member Author

marcosrdz commented Oct 30, 2024

is that a requirement by apple? or its up to us to change? cause frankly, modifying client is easier than server in this case

Its a requirement. Client has to receive it on the payload. Otherwise a compromised app could intercept it

@Overtorment
Copy link
Member

is that a requirement by apple? or its up to us to change? cause frankly, modifying client is easier than server in this case

Its a requirement. Client has to receive it on the payload. Otherwise a compromised app could intercept it

wtf. post docs link pls

@marcosrdz
Copy link
Member Author

is that a requirement by apple? or its up to us to change? cause frankly, modifying client is easier than server in this case

Its a requirement. Client has to receive it on the payload. Otherwise a compromised app could intercept it

wtf. post docs link pls

https://developer.apple.com/documentation/usernotifications/declaring-your-actionable-notification-types

For LOCAL notifications you can do do locally. Not for remote

@marcosrdz
Copy link
Member Author

https://developer.apple.com/documentation/usernotifications/unnotificationcategory

To apply category objects to your notifications, include the category’s identifier string in the payload of any notifications you create. For local notifications, put this string in the categoryIdentifier property of the UNMutableNotificationContent object that you use to specify the notification’s content. For remote notifications, use this string as the value of the category key in the aps dictionary of your payload.

@marcosrdz
Copy link
Member Author

@Overtorment any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants